#ifndef SAMPLE_GRAPH_H
#define SAMPLE_GRAPH_H

#include <string>
#include <vector>
#include <map>
#include <set>
using namespace std;


// This class use breath first search to sample a random graph
class SampleGraph{
public:
	// sample_size: number of nodes that we want to sample
	// in_node_file: input file about graph nodes and the name
	// in_edge_file: input file about graph links, in twitter it is the followed -> following
	// output to out_dir director
	SampleGraph(int sample_size, string in_node_file, string in_edge_file, string out_dir);

private:
	// all possible nodes are stored in all_nodes and the names are stored in node_names
	void SampleNode(string in_node_file, vector<int>& all_nodes,  map<int,string>& node_names);

	// random sample sample_size number of nodes, output to out_node_file using random walk model
	// extract edge where both ends are in the sampled nodes, output to out_adj_file
	void SampleEdge(int sample_size, string in_edge_file, vector<int>& all_nodes, map<int,string>& node_names, string out_node_file, string out_adj_file);
};

#endif